package munyorderweb_DB;

import java.sql.Connection;
import java.sql.DriverManager;

public class DB_manager {
	public static Connection getConnection(){
		try{
			//仮作成、あて先はコマンドプロンプト用使用中
			System.out.println("接続前");
			Class.forName("com.mysql.jdbc.Driver");
			System.out.println("接続前2");
			Connection con = DriverManager.getConnection(
					"jdbc:mysql://localhost/muny",
					"root",
					"munymuny");
			System.out.println("接続しました");
			return con;

		}catch(Exception e)
		{
			System.out.println("DB接続エラー");
			throw new IllegalStateException(e);

		}
	}

}
